import requests
import json
import os

with open("metric.json", "r", encoding="utf-8") as f:
    metric = json.load(f)
with open("model_config.json", "r", encoding="utf-8") as f:
    model_config = json.load(f)
data = {
    "model": 1,
    "dataset": 3,
    "metric": json.dumps(metric),
    "model_config": json.dumps(model_config),
    "description": "test",
    "branch": "dev"
}
api_url = "http://cc.qk0.cc:8001/experiments/"
rsp = requests.post(api_url, data=data)
print(rsp.text, rsp.status_code)
